import axios from 'axios'
import type {AxiosRequestConfig} from 'axios'
// 创建一个实例
const request = axios.create({
  baseURL:"http://dida100.com:8888",
  timeout:5000
})
 
// 请求拦截
request.interceptors.request.use((config:AxiosRequestConfig):any=>{
  config.headers = {
    ...config.headers,
    "Authorization":'Bearer '+sessionStorage.getItem("token")
  }
  return config;
})

// 导出
export default request